package com.xzs.thinking.exception;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

import javax.servlet.http.HttpServletRequest;

/**
 * @author : Iris.Xiao
 * @date : 2017/11/17 16:39
 * @description :
 */
@ControllerAdvice(basePackages = "com.xzs.thinking.controller")
public class ExceptionHandlerController {
    @ExceptionHandler(value = Exception.class)
    public void defaultErrorHandler(HttpServletRequest req, Exception e)  {
        e.printStackTrace();
        System.out.println("GlobalDefaultExceptionHandler.defaultErrorHandler()");
    }
}
